# Copyright 2023 Leo <lipf160627@163.com>. All rights reserved.
# Use of this source code is governed by a MIT style
# license that can be found in the LICENSE file.

.PHONY: swagger.generate
swagger.generate:
	@echo "===========> Generating swagger API docs"
	@swagger generate spec --scan-models -w $(ROOT_DIR) -o $(ROOT_DIR)/internal/api/v1/swagger/swagger.yaml

.PHONY: swagger.serve
swagger.serve:
	@swagger serve -F=redoc --no-open --port 36666 $(ROOT_DIR)/internal/api/v1/swagger/swagger.yaml

.PHONY: swagger.clean
swagger.clean:
	-@rm $(ROOT_DIR)/internal/api/v1/swagger/swagger.yaml